package com.atguigu.gmall.all.controller;

import com.atguigu.gmall.order.client.OrderFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;


import java.util.Map;

/**
 * @Description: 订单
 * @Author: Mr.Cao
 * @DateTime: 2021/10/21 11:25
 * BMW F750GS
 **/
@Controller
public class OrderInfoController {

    @Autowired
    private OrderFeignClient orderFeignClient;


    /**
     * 去结算页
     * */
    @GetMapping("trade.html")
    public String trade(Model model){
        Map<String, Object> trade = orderFeignClient.trade();
        model.addAllAttributes(trade);
        return "order/trade";
    }
}
